package database

import (
	_ "github.com/go-sql-driver/mysql"
	"log"
	"LazyPig/pkg"
	"LazyPig/pkg/conf"
)

var SqlDB *pkg.Dblib

func init() {
	dbLib, err := pkg.NewDblib("mysql", conf.MysqlUser+ ":" +conf.MysqlPass+ "@tcp(" +conf.MysqlUrls+ ")/" +conf.MysqlDb+ "?charset=utf8&loc=Local")
	if err != nil {
		log.Fatal(err.Error())
	}
	SqlDB = dbLib
}